{template 'common/header'}
<ul class="nav nav-tabs">
    <li><a href="{php echo $this->createWebUrl('company', array('op'=>'display'));}">公司列表</a></li>
    <li class="active"><a href="javascript:;">{if $id==0}添加公司{/if}{if $id!=0}编辑公司{/if}</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" id="form">
        <div class="panel panel-default">
            <div class="panel-heading">
                {if $id==0}添加公司{/if}{if $id!=0}编辑公司{/if}
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">标题：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="title" value="{$cache['title']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">公司名称：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="name" value="{$cache['name']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">公司简称：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="shortname" value="{$cache['shortname']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">标签：</label>
                    <div class="col-sm-6">
                        {loop $label $key $item}
                        <div class="checkbox col-sm-4">
                            <label><input type="checkbox" name="label[]" value="{$item['unicode']}" {if in_array($item['unicode'],$labelarr)}checked{/if}/>{$item['name']}</label>
                        </div>
                        {/loop}
                        {if empty($label)}
                        <label class="control-label">暂无标签，请到标签管理处添加</label>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">关键字：</label>
                    <div class="col-sm-6">
                        {loop $keyword $key $item}
                        <div class="checkbox col-sm-4">
                            <label><input type="checkbox" name="keyword[]" value="{$item['unicode']}" {if in_array($item['unicode'],$keywordarr)}checked{/if}/>{$item['name']}</label>
                        </div>
                        {/loop}
                        {if empty($keyword)}
                        <label class="control-label">暂无关键字，请到关键字管理处关键字</label>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">官网URL：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="url" value="{$cache['url']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">公司Logo：</label>
                    <div class="col-sm-6">
                        {php echo tpl_form_field_image('logo',$cache['logo']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">公司Banner：</label>
                    <div class="col-sm-6">
                        {php echo tpl_form_field_image('banner',$cache['banner']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">宣传语：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="propagenda" value="{$cache['propagenda']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">简介：</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" name="description">{$cache['description']} </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">分享标题：</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="sharetitle" value="{$cache['sharetitle']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">分享描述：</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" name="sharedescription">{$cache['sharedescription']} </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label">分享图片：</label>
                    <div class="col-sm-6">
                        {php echo tpl_form_field_image('shareimage',$cache['shareimage']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 col-lg-3 control-label"></label>
                    <div class="col-sm-6">
                        <input name="submit" type="submit" value="保存" class="btn btn-primary" />
						<input type="hidden" name="token" value="{$_W['token']}" />
                        <input type="hidden" name="id" value="{$id}" />
                        <input type="hidden" name="op" value="{$op}" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
{template 'common/footer'}
